<div id="current-user">
	{if (!empty($CurrentUser))}

		<!--<span class="gravatar">
			{eval
				$gravatar = "http://www.gravatar.com/avatar/" . md5($CurrentUser->email). "?"
				 	. "size=22";
				echo "<img src=\"{$gravatar}\" />";
			}
		</span>-->

		<span class="username">Welcome 
			{eval echo $html->link($CurrentUser->username.'', array(
				'admin' => false, 'plugin' => null,
				'project' => false, 'fork' => false,
				'controller' => 'dashboard', 'action' => 'index'
				), array('title' => 'view your dashboard')); }
		</span>

		<div class="links">
			{if (empty($CurrentUser->status))}
				<span class="activate link">
					{eval echo $html->link(__('activate',true), array(
						'admin' => false, 'plugin' => null,
						'project' => false, 'fork' => false,
						'controller' => 'users', 'action' => 'activate'
						), array('title' => 'activate your account')); }
				</span>
			{/if}

			<span class="account link">
				{eval echo $html->link(__('account',true), array(
					'admin' => false, 'plugin' => null,
					'project' => false, 'fork' => false,
					'controller' => 'users', 'action' => 'account'
					), array('title' => 'edit your account')); }
			</span>
			<span class="dashboard link">
				{eval echo $html->link(__('admin pannel',true), '/admin', array('title' => 'goto admin pannel','target'=>'_blank'))}
			</span>

			<span class="logout link">
				{eval echo $html->link(__('logout',true), array(
					'admin' => false, 'plugin' => null,
					'project' => false, 'fork' => false,
					'controller' => 'users', 'action' => 'logout'
				))}
			</span>
		</div>
	{else}
		<span class="login">
			{eval echo $html->link(__('Login',true), array(
				'admin' => false, 'plugin' => null,
				'project' => false, 'fork' => false,
				'controller' => 'users', 'action' => 'login'
			)); }
			or
			{eval echo $html->link(__('Register',true), array(
				'admin' => false, 'plugin' => null,
				'project' => false, 'fork' => false,
				'controller' => 'users', 'action' => 'register'
			)); }
		</span>
	{/if}
</div>
